/**
 * @copyright Copyright (c) 2025 CSG Digital Grid Technology (Guangdong) Co., Ltd.
 * @author Chen Yongjie
 */
#ifndef __TEST_APN_H
#define __TEST_APN_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <CUnit/CUnit.h>

// Forward declaration to avoid including "apn.h" if not needed
// (since apn.h may not be available in test-only build)
struct APNMsg;
extern struct APNMsg apnMsg;

/*
 * @brief Test the interactive APN addition function (wwan_apn_add)
 * @note This test simulates user input via global apnMsg setup
 * @warning Requires mocked stdin or pre-filled apnMsg
 */
void test_wwan_apn_add(void);

/*
 * @brief Test the APN display function (wwan_apn_show)
 * @note Tests "ppp0", "ppp1", and "all" modes
 */
void test_wwan_apn_show(void);

/*
 * @brief Test deletion of a single APN entry by index (wwan_apn_delete_one)
 * @note Validates index parsing and array bounds
 */
void test_wwan_apn_delete_one(void);

/*
 * @brief Test deletion of all APNs under a carrier (wwan_apn_delete_carrier)
 * @note Tests "Mobile", "Unicom", "Telecom" on both ppp0/ppp1
 */
void test_wwan_apn_delete_carrier(void);

#endif /* __TEST_APN_H */